<div ng-include="'components/navbar/navbar.html'"></div>

<div class="container">
  <section>
    <h2>Login</h2>
    <form class="form" name="form" ng-submit="login(form)" novalidate>

      <div class="form-group">
        <label>Phone</label>

        <input type="tel" name="phone" class="form-control" ng-model="user.phone" required>
      </div>

      <div class="form-group">
        <label>Password</label>

        <input type="password" name="password" class="form-control" ng-model="user.password" required>
      </div>

      <div class="form-group has-error">
        <p class="help-block" ng-show="form.phone.$error.required && form.password.$error.required && submitted">
           Please enter your phone and password.
        </p>

        <p class="help-block">{{ errors.other }}</p>
      </div>

      <div>
        <button class="btn btn-inverse btn-login" type="submit">
          Login
        </button>
      </div>

    </form>
  </section>
</div>
